package com.ysh.xiaomi.service.impl;

import com.ysh.xiaomi.dao.GoodTypeDao;
import com.ysh.xiaomi.dao.GoodsDao;
import com.ysh.xiaomi.dao.impl.GoodTypeDaoImpl;
import com.ysh.xiaomi.dao.impl.GoodsDaoImpl;
import com.ysh.xiaomi.pojo.PageBean;
import com.ysh.xiaomi.pojo.TbGoods;
import com.ysh.xiaomi.service.GoodsService;

import java.util.List;

/**
 * 袁胜虎 on 2022/8/17 19:47
 */
public class GoodsServiceImpl implements GoodsService {
    GoodsDao goodsDao = new GoodsDaoImpl();
    @Override
    public List<TbGoods> findByType(Long typeId, PageBean pageBean) {
        return goodsDao.findByType(typeId,pageBean);
    }

    @Override
    public TbGoods findById(Long id) {
        return goodsDao.findById(id);
    }

    @Override
    public List<TbGoods> findByIds(List ids) {
        return goodsDao.findByIds(ids);
    }

    @Override
    public int addGoods(TbGoods tbGoods) {
        return this.goodsDao.addGoods(tbGoods);
    }
}
